#ifndef __DRIVER_GPTIM_H__
#define __DRIVER_GPTIM_H__

#include "Common_Config.h"
#include "Driver_GPIO.h"

typedef enum
{
    GPTIM_GPIO_INDEX_AM1,
    GPTIM_GPIO_INDEX_AM2,
    GPTIM_GPIO_INDEX_AM5,
    GPTIM_GPIO_INDEX_AM6,
    GPTIM_GPIO_INDEX_AM7,
    GPTIM_GPIO_INDEX_AM8,
    GPTIM_GPIO_INDEX_PUMP_EN,
    GPTIM_GPIO_INDEX_MAX,
} GPTIMGPIOIndex_e;

/**
 * @brief 初始化通用定时器
 *
 */
void Driver_GPTIM_Init(void);

/**
 * @brief 按照设定的占空比 使能或禁用 选择的通道
 *
 * @param gptimX            定时器号
 * @param channel           通道号
 * @param isComplementary   是否为互补通道
 * @param dutyCycle         占空比
 * @param isEnable          使能 or 禁用
 */
void Driver_GPTIM_SetChannelDutyAndState(void *gptimX, uint32_t channel, bool isComplementary,
                                         uint8_t dutyCycle, bool isEnable);

#endif
